/*
 * @Author: SimonCK666 SimonYang223@163.com
 * @Date: 2022-05-07 20:13:27
 * @LastEditors: SimonCK666 SimonYang223@163.com
 * @LastEditTime: 2022-05-07 20:17:12
 * @FilePath: \golang-concept\L4_gofunc\return.go
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package main

import (
	"fmt"
)

func test1() {
	fmt.Printf("既没有参数也没有返回值。。\n")
}

// 多个返回值
func test2() (name string, age int) {
	name = "Tom"
	age = 21
	// return name, age
	// or
	return
}

func return_opt() {
	test1()
	name, age := test2()
	fmt.Printf("name: %v, age: %v\n", name, age)
}
